package lkx.demo.test6._04recursion;

/**
 * @author kunxianli
 * @date 2024/02/04 16:51
 **/
public class TestRecursion {

    //  计算n!
    public static void main(String[] args) {
        TestRecursion testRecursion = new TestRecursion();
        System.out.println(testRecursion.getMul(1));
    }

    public int getMul(int n){
        if(n == 1){
            return 1;
        }
        return n*getMul(n-1);
    }

}
